package com.zhaoyu.utils.threadlocal;

import com.zhaoyu.model.media.pojos.WmUser;

/**
 * 使用过滤器解析后的用户需要放在当前线程中
 */
public class WmThreadLocalUtils2 {

    private final static ThreadLocal<WmUser> userThreadLocal = new ThreadLocal<>();

    /**
     * 设置当前线程中的用户(WmUser)
     */
    public static void setUser(WmUser wmUser){
        userThreadLocal.set(wmUser);
    }

    /**
     * 获取线程中的用户(WmUser)
     */
    public static WmUser getUser(){
        return userThreadLocal.get();
    }

}